package io.framework.modules.soil.enums;

/**
 * /**
 * 〈土壤 类型枚举类〉
 *
 * @Author GJQ
 * @Create 2020/5/29
 * @Since 1.0.0
 */

public enum SoilTypeEnum {

    SOIL_TYPE1(1,"居民区周边土壤"),
    SOIL_TYPE2(2,"基本农田"),
    SOIL_TYPE3(3,"畜牧养殖周边土壤"),
    SOIL_TYPE4(4,"园地"),
    SOIL_TYPE5(5,"饮用水源地"),
    SOIL_TYPE6(6,"生活垃圾场周边土壤");

    private int type;
    private String typeName;

    public static String getTypeNameByType(int type){
        for(SoilTypeEnum typeEnum : SoilTypeEnum.values()){
            if(typeEnum.getType() == type){
                return typeEnum.getTypeName();
            }
        }
        return "";
    }

    public int getType() {
        return type;
    }

    public String getTypeName() {
        return typeName;
    }

    SoilTypeEnum(int type, String typeName) {
        this.type = type;
        this.typeName = typeName;
    }
}
